package org.mistlab.models
{

import org.papervision3d.objects.primitives.Plane;
import org.mistlab.core.CoreModel;
import org.papervision3d.materials.BitmapMaterial;

    public class Background extends CoreModel
    {
	    private var _planeBackground0:Plane;
	    private var _planeBackground1:Plane;
	    private var _planeBackground2:Plane;
	    
    	public function Background()
    	{
    		super();
            
            var material0:BitmapMaterial = new BitmapMaterial(storage.getBitmapData('Mountain Background'));            
            _planeBackground0 = new Plane(material0, 600, 414, 1, 1);
            _planeBackground0.y = 207;
            _planeBackground0.x = 0;
            _planeBackground0.z = 0;            
            addChild(_planeBackground0);
            
            var material1:BitmapMaterial = new BitmapMaterial(storage.getBitmapData('Second Background'));
            _planeBackground1 = new Plane(material1, 300, 200, 1, 1);
            _planeBackground1.y = 100;
            _planeBackground1.x = 0;
            _planeBackground1.z = -70;
            addChild(_planeBackground1);
            
            var material2:BitmapMaterial = new BitmapMaterial(storage.getBitmapData('Ground'));
            _planeBackground2 = new Plane(material2, 600, 300, 1, 1);
            _planeBackground2.y = 0;
            _planeBackground2.x = 0;
            _planeBackground2.z = -150;
            _planeBackground2.rotationX = 90;
            addChild(_planeBackground2);    
            
    	}
	
    }

}